// #define quickread
#ifdef quickread
#include <cstdio> 
template <typename T>
inline void read(T& x)
{
    int c=getchar(), f=1; x=0;
    while(c<'0'||'9'<c) {if(c=='-') f=-1; c=getchar();}
    while('0'<=c&&c<='9') 
        x=(x<<3)+(x<<1)+c-'0', c=getchar();
    x*=f;
}
template <typename T>
inline void quickwrite(T x)
{
    if(x<0) putchar('-'), x*=-1;
    if(x>=10) quickwrite(x/10);
    putchar(x%10+'0');
}
#else 
#include <iostream>
#endif
#include <algorithm>
#include <cmath>
using namespace std;
#define DEBUG
#define CalDist(x1, y1, x2, y2) ((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))
const double eps=1e-6;
const int N=1e3+10;
int n;
double stx, sty, enx, eny, dist;
double a[N], sum;

void init()
{
    sum=0;
    cin >> n;
    cin >> stx >> sty >> enx >> eny;
    for(int i=1; i<=n; i++) cin >> a[i];
    dist=sqrt(CalDist(stx, sty, enx, eny));
    a[++n]=dist;
    sort(a+1, a+1+n);
    sum=a[n]; //所有可走路径最大值
}

// 路径构成一条多边形：任意一条边<=其他所有边的总和
void solve()
{
    init();
    
    for(int i=1; i<n; i++) sum-=a[i];
    if(sum<=0) puts("Yes");
    else puts("No");
}

// #undef DEBUG
signed main()
{
    #ifdef DEBUG
        freopen("../in.txt", "r", stdin);
        freopen("../out.txt", "w", stdout);
    #endif
    #ifndef quickread
    // ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    #endif

    int T=1; scanf("%d", &T);
    while(T--) 
    {
        solve();
    }
    return 0;
}
